package cate.common.table.d;

import cate.common.table.common.ParamSheet;
import cate.common.util.TimeTool;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("战令")
public class GDWarOrder {

    @NoteClass("战令-激活状态")
    public static class ActiveType {

        @NoteField("未激活")
        public static final byte NONE = 0;

        @NoteField("解锁基础")
        public static final byte BASE = 1;

        @NoteField("解锁进阶")
        public static final byte ADVANCE = 2;
    }

    @NoteClass("战令-充值项类型")
    public static class PayItemType {

        @NoteField("未知")
        public static final byte NONE = 0;

        @NoteField("基础款")
        public static final byte BASE = 1;

        @NoteField("补差价")
        public static final byte UPGRADE = 2;

        @NoteField("解锁进阶")
        public static final byte ADVANCE = 3;
    }

    @NoteClass("战令-任务类型")
    public static class TaskType {
        @NoteField("每日任务")
        public static final byte DAILY = 1;

        @NoteField("永久任务")
        public static final byte PERMANENT = 2;

        @NoteField("周常")
        public static final byte WEEKLY = 3;
    }


    @NoteField("ip联动开始时间")
    public static long IP_START_TIME;

    @NoteField("ip联动结束时间")
    public static long IP_END_TIME;

    /** 读取excel中配置的参数 */
    public static void initialize(ParamSheet paramSheet) {
        String startStr = GDParamTool.getString(paramSheet,131001, "2022-09-13 00:00:00");
        IP_START_TIME = TimeTool.parseTime(startStr);
        String endStr = GDParamTool.getString(paramSheet,131002, "2022-11-13 23:59:59");
        IP_END_TIME = TimeTool.parseTime(endStr);
    }
}
